ALMaSS  1.0
The Animal, Landscape and Man Simulation System
LE_TypeClass Class Reference

#include <elements.h>

Public Member Functions

TTypesOfLandscapeElement TranslateEleTypes (int EleReference)
 
TTypesOfVegetation TranslateVegTypes (int VegReference)
 
int BackTranslateEleTypes (TTypesOfLandscapeElement EleReference)
 
int BackTranslateVegTypes (TTypesOfVegetation VegReference)
 
int VegTypeToCurveNum (TTypesOfVegetation VegReference)
 

Member Function Documentation

◆ BackTranslateEleTypes()

int LE_TypeClass::BackTranslateEleTypes ( TTypesOfLandscapeElement  EleReference)
3610  {
3611  static char error_num[ 20 ];
3612 
3613  // This returns the vegetation type (or crop type) as applicable
3614  switch ( EleReference )
3615  {
3616  case tole_Building: return 5;
3617  case tole_UrbanNoVeg: return 8;
3618  case tole_UrbanVeg: return 9;
3619  case tole_Garden: return 11;
3620  case tole_AmenityGrass: return 12;
3621  case tole_RoadsideVerge: return 13;
3622  case tole_Parkland: return 14;
3623  case tole_StoneWall: return 15;
3624  case tole_BuiltUpWithParkland: return 16;
3625  case tole_UrbanPark: return 17;
3626  case tole_Field: return 20;
3627  case tole_PermPastureTussocky: return 27;
3628  case tole_PermPastureLowYield: return 26;
3629  case tole_UnsprayedFieldMargin: return 31;
3630  case tole_PermanentSetaside: return 33;
3631  case tole_PermPasture: return 35;
3632  case tole_DeciduousForest: return 40;
3633  case tole_Copse: return 41;
3634  case tole_ConiferousForest: return 50;
3635  case tole_YoungForest: return 55;
3636  case tole_Orchard: return 56;
3637  case tole_BareRock: return 69;
3638  case tole_OrchardBand: return 57;
3639  case tole_MownGrass: return 58;
3640  case tole_MixedForest: return 60;
3641  case tole_Scrub: return 70;
3642  case tole_PitDisused: return 75;
3643  case tole_Saltwater: return 80;
3644  case tole_Freshwater: return 90;
3645  case tole_Heath: return 94;
3646  case tole_Marsh: return 95;
3647  case tole_River: return 96;
3648  case tole_RiversideTrees: return 97;
3649  case tole_RiversidePlants: return 98;
3650  case tole_Coast: return 100;
3651  case tole_SandDune: return 101;
3652  case tole_NaturalGrassDry: return 110;
3653  case tole_ActivePit: return 115;
3654  case tole_Railway: return 118;
3655  case tole_LargeRoad: return 121;
3656  case tole_SmallRoad: return 122;
3657  case tole_Track: return 123;
3658  case tole_Hedges: return 130;
3659  case tole_HedgeBank: return 140;
3660  case tole_BeetleBank: return 141;
3661  case tole_Chameleon: return 150;
3662  case tole_FieldBoundary: return 160;
3663  case tole_RoadsideSlope: return 201;
3664  case tole_MetalledPath: return 202;
3665  case tole_Carpark: return 203;
3666  case tole_Churchyard: return 204;
3667  case tole_NaturalGrassWet: return 205;
3668  case tole_Saltmarsh: return 206;
3669  case tole_Stream: return 207;
3670  case tole_HeritageSite: return 208;
3671  case tole_Wasteland: return 209;
3672  case tole_UnknownGrass: return 210;
3673  case tole_WindTurbine: return 211;
3674  case tole_Pylon: return 212;
3675  case tole_IndividualTree: return 213;
3676  case tole_PlantNursery: return 214;
3677  case tole_Vildtager: return 215;
3678  case tole_WoodyEnergyCrop: return 216;
3679  case tole_WoodlandMargin: return 217;
3680  case tole_PermPastureTussockyWet: return 218;
3681  case tole_Pond: return 219;
3682  case tole_FishFarm: return 220;
3683  case tole_RiverBed: return 221;
3684  case tole_DrainageDitch: return 222;
3685  case tole_Canal: return 223;
3686  case tole_RefuseSite: return 224;
3687  case tole_Fence: return 225;
3688  case tole_WaterBufferZone: return 226;
3689 
3690  case tole_Missing: return 2112;
3691 
3692  //case tole_Foobar: return 999;
3693  // !! type unknown - should not happen
3694  default:
3695  sprintf( error_num, "%d", EleReference );
3696  g_msg->Warn( WARN_FILE, "LE_TypeClass::BackTranslateEleTypes(): ""Unknown landscape element type:", error_num );
3697  exit( 1 );
3698  }
3699 }
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: maperrormsg.cpp:59
class MapErrorMsg * g_msg
This pointer provides access the to the internal ALMaSS error message system.
Definition: maperrormsg.cpp:41
@ WARN_FILE
Definition: maperrormsg.h:37
@ tole_BareRock
Definition: tole_declaration.h:75
@ tole_PermPastureTussocky
Definition: tole_declaration.h:45
@ tole_Chameleon
Definition: tole_declaration.h:110
@ tole_Saltmarsh
Definition: tole_declaration.h:88
@ tole_WoodyEnergyCrop
Definition: tole_declaration.h:94
@ tole_DrainageDitch
Definition: tole_declaration.h:105
@ tole_Carpark
Definition: tole_declaration.h:85
@ tole_Coast
Definition: tole_declaration.h:67
@ tole_UrbanNoVeg
Definition: tole_declaration.h:78
@ tole_Stream
Definition: tole_declaration.h:89
@ tole_Saltwater
Definition: tole_declaration.h:66
@ tole_MixedForest
Definition: tole_declaration.h:53
@ tole_HeritageSite
Definition: tole_declaration.h:90
@ tole_WoodlandMargin
Definition: tole_declaration.h:98
@ tole_RoadsideSlope
Definition: tole_declaration.h:83
@ tole_River
Definition: tole_declaration.h:65
@ tole_Canal
Definition: tole_declaration.h:106
@ tole_WaterBufferZone
Definition: tole_declaration.h:108
@ tole_StoneWall
Definition: tole_declaration.h:56
@ tole_Parkland
Definition: tole_declaration.h:77
@ tole_NaturalGrassWet
Definition: tole_declaration.h:87
@ tole_NaturalGrassDry
Definition: tole_declaration.h:48
@ tole_PermPastureTussockyWet
Definition: tole_declaration.h:100
@ tole_Missing
Definition: tole_declaration.h:109
@ tole_RefuseSite
Definition: tole_declaration.h:107
@ tole_UrbanPark
Definition: tole_declaration.h:79
@ tole_Pylon
Definition: tole_declaration.h:96
@ tole_PermanentSetaside
Definition: tole_declaration.h:46
@ tole_RiverBed
Definition: tole_declaration.h:104
@ tole_Garden
Definition: tole_declaration.h:58
@ tole_Pond
Definition: tole_declaration.h:101
@ tole_Scrub
Definition: tole_declaration.h:42
@ tole_Fence
Definition: tole_declaration.h:57
@ tole_Field
Definition: tole_declaration.h:43
@ tole_Copse
Definition: tole_declaration.h:82
@ tole_PermPasture
Definition: tole_declaration.h:47
@ tole_Hedges
Definition: tole_declaration.h:37
@ tole_Track
Definition: tole_declaration.h:59
@ tole_Heath
Definition: tole_declaration.h:70
@ tole_Freshwater
Definition: tole_declaration.h:64
@ tole_PitDisused
Definition: tole_declaration.h:50
@ tole_FieldBoundary
Definition: tole_declaration.h:40
@ tole_PlantNursery
Definition: tole_declaration.h:95
@ tole_DeciduousForest
Definition: tole_declaration.h:52
@ tole_UrbanVeg
Definition: tole_declaration.h:103
@ tole_ActivePit
Definition: tole_declaration.h:63
@ tole_RiversidePlants
Definition: tole_declaration.h:49
@ tole_Building
Definition: tole_declaration.h:62
@ tole_RoadsideVerge
Definition: tole_declaration.h:38
@ tole_Vildtager
Definition: tole_declaration.h:99
@ tole_Orchard
Definition: tole_declaration.h:71
@ tole_MownGrass
Definition: tole_declaration.h:74
@ tole_YoungForest
Definition: tole_declaration.h:55
@ tole_OrchardBand
Definition: tole_declaration.h:73
@ tole_SmallRoad
Definition: tole_declaration.h:60
@ tole_Churchyard
Definition: tole_declaration.h:86
@ tole_BuiltUpWithParkland
Definition: tole_declaration.h:80
@ tole_AmenityGrass
Definition: tole_declaration.h:76
@ tole_PermPastureLowYield
Definition: tole_declaration.h:44
@ tole_HedgeBank
Definition: tole_declaration.h:68
@ tole_Railway
Definition: tole_declaration.h:39
@ tole_WindTurbine
Definition: tole_declaration.h:97
@ tole_ConiferousForest
Definition: tole_declaration.h:54
@ tole_SandDune
Definition: tole_declaration.h:81
@ tole_Wasteland
Definition: tole_declaration.h:92
@ tole_IndividualTree
Definition: tole_declaration.h:93
@ tole_UnknownGrass
Definition: tole_declaration.h:91
@ tole_RiversideTrees
Definition: tole_declaration.h:51
@ tole_LargeRoad
Definition: tole_declaration.h:61
@ tole_UnsprayedFieldMargin
Definition: tole_declaration.h:72
@ tole_BeetleBank
Definition: tole_declaration.h:69
@ tole_MetalledPath
Definition: tole_declaration.h:84
@ tole_FishFarm
Definition: tole_declaration.h:102
@ tole_Marsh
Definition: tole_declaration.h:41

References g_msg, tole_ActivePit, tole_AmenityGrass, tole_BareRock, tole_BeetleBank, tole_Building, tole_BuiltUpWithParkland, tole_Canal, tole_Carpark, tole_Chameleon, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_DeciduousForest, tole_DrainageDitch, tole_Fence, tole_Field, tole_FieldBoundary, tole_FishFarm, tole_Freshwater, tole_Garden, tole_Heath, tole_HedgeBank, tole_Hedges, tole_HeritageSite, tole_IndividualTree, tole_LargeRoad, tole_Marsh, tole_MetalledPath, tole_Missing, tole_MixedForest, tole_MownGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_Orchard, tole_OrchardBand, tole_Parkland, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PermPastureTussockyWet, tole_PitDisused, tole_PlantNursery, tole_Pond, tole_Pylon, tole_Railway, tole_RefuseSite, tole_River, tole_RiverBed, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_Saltmarsh, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UnknownGrass, tole_UnsprayedFieldMargin, tole_UrbanNoVeg, tole_UrbanPark, tole_UrbanVeg, tole_Vildtager, tole_Wasteland, tole_WaterBufferZone, tole_WindTurbine, tole_WoodlandMargin, tole_WoodyEnergyCrop, tole_YoungForest, MapErrorMsg::Warn(), and WARN_FILE.

Referenced by Landscape::BackTranslateEleTypes(), Landscape::BeetleBankAdd(), Landscape::Landscape(), Landscape::NewElement(), and Landscape::RemoveSmallPolygons().

◆ BackTranslateVegTypes()

int LE_TypeClass::BackTranslateVegTypes ( TTypesOfVegetation  VegReference)
3345  {
3346  char error_num[ 20 ];
3347 
3348  // This returns the vegetation type (or crop type) as applicable
3349  switch ( VegReference ) {
3350  case tov_SpringBarley:
3351  return 1;
3352  case tov_WinterBarley:
3353  return 2;
3354  case tov_SpringWheat:
3355  return 3;
3356  case tov_WinterWheat:
3357  return 4;
3358  case tov_WinterRye:
3359  return 5;
3360  case tov_Oats:
3361  return 6;
3362  case tov_Triticale:
3363  return 7;
3364  case tov_Maize:
3365  return 8;
3366  case tov_SpringBarleySeed:
3367  return 13;
3369  return 14;
3371  return 15;
3373  return 16;
3375  return 17;
3377  return 18;
3379  return 19;
3380  case tov_SpringRape:
3381  return 21;
3382  case tov_WinterRape:
3383  return 22;
3384  case tov_FieldPeas:
3385  return 30;
3386  case tov_FieldPeasSilage:
3387  return 31;
3388  case tov_BroadBeans:
3389  return 32;
3390  case tov_Setaside:
3391  return 50;
3392  case tov_PermanentSetaside:
3393  return 54;
3394  case tov_YoungForest:
3395  return 55;
3396  case tov_FodderBeet:
3397  return 60;
3398  case tov_SugarBeet:
3399  return 61;
3401  return 65;
3402  case tov_PotatoesIndustry:
3403  return 92;
3404  case tov_Potatoes:
3405  return 93;
3406  case tov_SeedGrass1:
3407  return 94;
3408  case tov_OWinterBarley:
3409  return 102;
3410  case tov_OWinterBarleyExt:
3411  return 611;
3412  case tov_OWinterRye:
3413  return 105;
3414  case tov_SpringBarleyGrass:
3415  return 107;
3417  return 108;
3418  case tov_SpringBarleySpr:
3419  return 109;
3420  case tov_OSBarleySilage:
3421  return 103;
3423  return 113;
3425  return 114;
3427  return 115;
3428  case tov_OWinterRape:
3429  return 122;
3431  return 140;
3433  return 141;
3435  return 142;
3437  return 165;
3438  case tov_SeedGrass2:
3439  return 194;
3440  case tov_OSpringBarley:
3441  return 201;
3443  return 204;
3444  case tov_OWinterWheat:
3445  return 205;
3446  case tov_OOats:
3447  return 206;
3448  case tov_OTriticale:
3449  return 207;
3450  case tov_OFieldPeas:
3451  return 230;
3452  case tov_OFieldPeasSilage:
3453  return 106;
3454  case tov_OFodderBeet:
3455  return 260;
3457  return 265;
3458  case tov_OCarrots:
3459  return 270;
3460  case tov_Carrots:
3461  return 271;
3462  case tov_OPotatoes:
3463  return 293;
3464  case tov_OSeedGrass1:
3465  return 294;
3466  case tov_OSpringBarleyPigs:
3467  return 306;
3469  return 307;
3471  return 308;
3473  return 340;
3475  return 365;
3477  return 366;
3478  case tov_OSeedGrass2:
3479  return 394;
3480  case tov_NaturalGrass:
3481  return 400;
3482  case tov_None:
3483  return 401;
3484  case tov_NoGrowth:
3485  return 402;
3486  case tov_WWheatPControl:
3487  return 601;
3489  return 602;
3490  case tov_WWheatPTreatment:
3491  return 603;
3493  return 604;
3494  case tov_WinterWheatShort:
3495  return 605;
3496  case tov_MaizeSilage:
3497  return 606;
3498  case tov_FodderGrass:
3499  return 607;
3501  return 608;
3502  case tov_OSpringBarleyExt:
3503  return 609;
3504  case tov_OMaizeSilage:
3505  return 610;
3507  return 612;
3508  case tov_Heath:
3509  return 613;
3510  case tov_OrchardCrop:
3511  return 700;
3512  case tov_WaterBufferZone:
3513  return 701;
3514  case tov_PLWinterWheat:
3515  return 801;
3516  case tov_PLWinterRape:
3517  return 802;
3518  case tov_PLWinterBarley:
3519  return 803;
3520  case tov_PLWinterTriticale:
3521  return 804;
3522  case tov_PLWinterRye:
3523  return 805;
3524  case tov_PLSpringWheat:
3525  return 806;
3526  case tov_PLSpringBarley:
3527  return 807;
3528  case tov_PLMaize:
3529  return 808;
3530  case tov_PLMaizeSilage:
3531  return 809;
3532  case tov_PLPotatoes:
3533  return 810;
3534  case tov_PLBeet:
3535  return 811;
3536  case tov_PLFodderLucerne1:
3537  return 812;
3538  case tov_PLFodderLucerne2:
3539  return 813;
3540  case tov_PLCarrots:
3541  return 814;
3542  case tov_PLSpringBarleySpr:
3543  return 815;
3544  case tov_PLWinterWheatLate:
3545  return 816;
3546  case tov_PLBeetSpr:
3547  return 817;
3548  case tov_PLBeans:
3549  return 818;
3550 
3551  case tov_NLBeet:
3552  return 850;
3553  case tov_NLCarrots:
3554  return 851;
3555  case tov_NLMaize:
3556  return 852;
3557  case tov_NLPotatoes:
3558  return 853;
3559  case tov_NLSpringBarley:
3560  return 854;
3561  case tov_NLWinterWheat:
3562  return 855;
3563  case tov_NLCabbage:
3564  return 856;
3565  case tov_NLTulips:
3566  return 857;
3567  case tov_NLGrassGrazed1:
3568  return 858;
3569  case tov_NLGrassGrazed2:
3570  return 859;
3572  return 860;
3573  case tov_NLCatchPeaCrop:
3574  return 861;
3575  case tov_NLBeetSpring:
3576  return 862;
3577  case tov_NLCarrotsSpring:
3578  return 863;
3579  case tov_NLMaizeSpring:
3580  return 864;
3581  case tov_NLPotatoesSpring:
3582  return 865;
3584  return 866;
3585  case tov_NLCabbageSpring:
3586  return 867;
3588  return 868;
3589  case tov_NLGrassGrazedLast:
3590  return 869;
3591 
3592  case tov_OGrazingPigs:
3593  return 271;
3594  case tov_Wasteland:
3595  return 272;
3597  return 888;
3598 
3599  case tov_Undefined:
3600  return 999;
3601  default: // No matching code so we need an error message of some kind
3602  sprintf( error_num, "%d", VegReference );
3603  g_msg->Warn( WARN_FILE, "LE_TypeClass::BackTranslateVegTypes(): ""Unknown vegetation type:", error_num );
3604  exit( 1 );
3605  }
3606 }
@ tov_WWheatPControl
Definition: tov_declaration.h:55
@ tov_NLPotatoesSpring
Definition: tov_declaration.h:103
@ tov_OWinterWheatUndersown
Definition: tov_declaration.h:49
@ tov_BroadBeans
Definition: tov_declaration.h:66
@ tov_PLBeans
Definition: tov_declaration.h:87
@ tov_PermanentGrassGrazed
Definition: tov_declaration.h:49
@ tov_PLBeetSpr
Definition: tov_declaration.h:86
@ tov_NLSpringBarley
Definition: tov_declaration.h:93
@ tov_SpringBarleySKManagement
Definition: tov_declaration.h:65
@ tov_OFieldPeas
Definition: tov_declaration.h:43
@ tov_NLCarrots
Definition: tov_declaration.h:90
@ tov_NLGrassGrazedLast
Definition: tov_declaration.h:108
@ tov_SpringBarleyPTreatment
Definition: tov_declaration.h:63
@ tov_SpringBarleyPeaCloverGrassStrigling
Definition: tov_declaration.h:60
@ tov_OSpringBarleyPigs
Definition: tov_declaration.h:47
@ tov_WWheatPTreatment
Definition: tov_declaration.h:55
@ tov_PermanentSetaside
Definition: tov_declaration.h:49
@ tov_WinterWheatStriglingCulm
Definition: tov_declaration.h:62
@ tov_DummyCropPestTesting
Definition: tov_declaration.h:112
@ tov_FodderGrass
Definition: tov_declaration.h:62
@ tov_SeedGrass1
Definition: tov_declaration.h:50
@ tov_OGrazingPigs
Definition: tov_declaration.h:44
@ tov_NLGrassGrazed1Spring
Definition: tov_declaration.h:107
@ tov_NoGrowth
Definition: tov_declaration.h:38
@ tov_CloverGrassGrazed2
Definition: tov_declaration.h:33
@ tov_OSpringBarley
Definition: tov_declaration.h:46
@ tov_NLGrassGrazed2
Definition: tov_declaration.h:98
@ tov_PotatoesIndustry
Definition: tov_declaration.h:50
@ tov_PermanentGrassTussocky
Definition: tov_declaration.h:49
@ tov_OSpringBarleyExt
Definition: tov_declaration.h:63
@ tov_NLMaizeSpring
Definition: tov_declaration.h:102
@ tov_FieldPeasSilage
Definition: tov_declaration.h:65
@ tov_OWinterRape
Definition: tov_declaration.h:47
@ tov_OPotatoes
Definition: tov_declaration.h:44
@ tov_WinterRape
Definition: tov_declaration.h:53
@ tov_PLSpringBarley
Definition: tov_declaration.h:76
@ tov_OPermanentGrassGrazed
Definition: tov_declaration.h:44
@ tov_SpringBarley
Definition: tov_declaration.h:52
@ tov_OWinterBarley
Definition: tov_declaration.h:47
@ tov_NLBeetSpring
Definition: tov_declaration.h:100
@ tov_SpringBarleyStriglingSingle
Definition: tov_declaration.h:60
@ tov_PLPotatoes
Definition: tov_declaration.h:79
@ tov_OSeedGrass1
Definition: tov_declaration.h:46
@ tov_NLCabbageSpring
Definition: tov_declaration.h:105
@ tov_SpringBarleySilage
Definition: tov_declaration.h:52
@ tov_PLCarrots
Definition: tov_declaration.h:83
@ tov_SpringBarleySeed
Definition: tov_declaration.h:52
@ tov_NLCabbage
Definition: tov_declaration.h:95
@ tov_NLCarrotsSpring
Definition: tov_declaration.h:101
@ tov_PLWinterBarley
Definition: tov_declaration.h:72
@ tov_SpringBarleyCloverGrass
Definition: tov_declaration.h:52
@ tov_Carrots
Definition: tov_declaration.h:31
@ tov_Wasteland
Definition: tov_declaration.h:66
@ tov_FieldPeas
Definition: tov_declaration.h:34
@ tov_WWheatPToxicControl
Definition: tov_declaration.h:55
@ tov_OTriticale
Definition: tov_declaration.h:47
@ tov_OMaizeSilage
Definition: tov_declaration.h:65
@ tov_PLWinterTriticale
Definition: tov_declaration.h:73
@ tov_Triticale
Definition: tov_declaration.h:53
@ tov_OFodderBeet
Definition: tov_declaration.h:65
@ tov_WinterWheat
Definition: tov_declaration.h:55
@ tov_OCarrots
Definition: tov_declaration.h:43
@ tov_OSBarleySilage
Definition: tov_declaration.h:56
@ tov_SpringWheat
Definition: tov_declaration.h:53
@ tov_WinterWheatStrigling
Definition: tov_declaration.h:59
@ tov_SeedGrass2
Definition: tov_declaration.h:50
@ tov_Undefined
Definition: tov_declaration.h:114
@ tov_PLMaizeSilage
Definition: tov_declaration.h:78
@ tov_OFieldPeasSilage
Definition: tov_declaration.h:56
@ tov_SugarBeet
Definition: tov_declaration.h:66
@ tov_PermanentGrassLowYield
Definition: tov_declaration.h:63
@ tov_CloverGrassGrazed1
Definition: tov_declaration.h:32
@ tov_NLWinterWheat
Definition: tov_declaration.h:94
@ tov_SpringRape
Definition: tov_declaration.h:53
@ tov_SpringBarleySpr
Definition: tov_declaration.h:66
@ tov_NLPotatoes
Definition: tov_declaration.h:92
@ tov_OSeedGrass2
Definition: tov_declaration.h:46
@ tov_NaturalGrass
Definition: tov_declaration.h:37
@ tov_PLFodderLucerne2
Definition: tov_declaration.h:82
@ tov_Oats
Definition: tov_declaration.h:40
@ tov_MaizeSilage
Definition: tov_declaration.h:62
@ tov_OBarleyPeaCloverGrass
Definition: tov_declaration.h:41
@ tov_SpringBarleyStriglingCulm
Definition: tov_declaration.h:62
@ tov_Maize
Definition: tov_declaration.h:36
@ tov_OSpringBarleyClover
Definition: tov_declaration.h:46
@ tov_OCloverGrassSilage1
Definition: tov_declaration.h:43
@ tov_NLPermanentGrassGrazed
Definition: tov_declaration.h:99
@ tov_PLMaize
Definition: tov_declaration.h:77
@ tov_WaterBufferZone
Definition: tov_declaration.h:110
@ tov_OCloverGrassGrazed2
Definition: tov_declaration.h:43
@ tov_Potatoes
Definition: tov_declaration.h:50
@ tov_NLSpringBarleySpring
Definition: tov_declaration.h:104
@ tov_PLSpringWheat
Definition: tov_declaration.h:75
@ tov_None
Definition: tov_declaration.h:39
@ tov_PLFodderLucerne1
Definition: tov_declaration.h:81
@ tov_Setaside
Definition: tov_declaration.h:50
@ tov_NLGrassGrazed1
Definition: tov_declaration.h:97
@ tov_OSpringBarleyGrass
Definition: tov_declaration.h:46
@ tov_OWinterWheat
Definition: tov_declaration.h:66
@ tov_OWinterBarleyExt
Definition: tov_declaration.h:65
@ tov_OWinterRye
Definition: tov_declaration.h:49
@ tov_OOats
Definition: tov_declaration.h:44
@ tov_Heath
Definition: tov_declaration.h:66
@ tov_OCloverGrassGrazed1
Definition: tov_declaration.h:43
@ tov_NLMaize
Definition: tov_declaration.h:91
@ tov_NLBeet
Definition: tov_declaration.h:89
@ tov_WinterRye
Definition: tov_declaration.h:55
@ tov_FodderBeet
Definition: tov_declaration.h:35
@ tov_NLTulips
Definition: tov_declaration.h:96
@ tov_SpringBarleyGrass
Definition: tov_declaration.h:52
@ tov_WinterWheatStriglingSingle
Definition: tov_declaration.h:62
@ tov_PLWinterRye
Definition: tov_declaration.h:74
@ tov_PLWinterWheatLate
Definition: tov_declaration.h:85
@ tov_WinterBarley
Definition: tov_declaration.h:53
@ tov_NLCatchPeaCrop
Definition: tov_declaration.h:106
@ tov_PLWinterWheat
Definition: tov_declaration.h:70
@ tov_SpringBarleyStrigling
Definition: tov_declaration.h:58
@ tov_PLBeet
Definition: tov_declaration.h:80
@ tov_WinterWheatShort
Definition: tov_declaration.h:56
@ tov_YoungForest
Definition: tov_declaration.h:60
@ tov_PLSpringBarleySpr
Definition: tov_declaration.h:84
@ tov_AgroChemIndustryCereal
Definition: tov_declaration.h:55
@ tov_OrchardCrop
Definition: tov_declaration.h:65
@ tov_PLWinterRape
Definition: tov_declaration.h:71

References g_msg, tov_AgroChemIndustryCereal, tov_BroadBeans, tov_Carrots, tov_CloverGrassGrazed1, tov_CloverGrassGrazed2, tov_DummyCropPestTesting, tov_FieldPeas, tov_FieldPeasSilage, tov_FodderBeet, tov_FodderGrass, tov_Heath, tov_Maize, tov_MaizeSilage, tov_NaturalGrass, tov_NLBeet, tov_NLBeetSpring, tov_NLCabbage, tov_NLCabbageSpring, tov_NLCarrots, tov_NLCarrotsSpring, tov_NLCatchPeaCrop, tov_NLGrassGrazed1, tov_NLGrassGrazed1Spring, tov_NLGrassGrazed2, tov_NLGrassGrazedLast, tov_NLMaize, tov_NLMaizeSpring, tov_NLPermanentGrassGrazed, tov_NLPotatoes, tov_NLPotatoesSpring, tov_NLSpringBarley, tov_NLSpringBarleySpring, tov_NLTulips, tov_NLWinterWheat, tov_NoGrowth, tov_None, tov_Oats, tov_OBarleyPeaCloverGrass, tov_OCarrots, tov_OCloverGrassGrazed1, tov_OCloverGrassGrazed2, tov_OCloverGrassSilage1, tov_OFieldPeas, tov_OFieldPeasSilage, tov_OFodderBeet, tov_OGrazingPigs, tov_OMaizeSilage, tov_OOats, tov_OPermanentGrassGrazed, tov_OPotatoes, tov_OrchardCrop, tov_OSBarleySilage, tov_OSeedGrass1, tov_OSeedGrass2, tov_OSpringBarley, tov_OSpringBarleyClover, tov_OSpringBarleyExt, tov_OSpringBarleyGrass, tov_OSpringBarleyPigs, tov_OTriticale, tov_OWinterBarley, tov_OWinterBarleyExt, tov_OWinterRape, tov_OWinterRye, tov_OWinterWheat, tov_OWinterWheatUndersown, tov_PermanentGrassGrazed, tov_PermanentGrassLowYield, tov_PermanentGrassTussocky, tov_PermanentSetaside, tov_PLBeans, tov_PLBeet, tov_PLBeetSpr, tov_PLCarrots, tov_PLFodderLucerne1, tov_PLFodderLucerne2, tov_PLMaize, tov_PLMaizeSilage, tov_PLPotatoes, tov_PLSpringBarley, tov_PLSpringBarleySpr, tov_PLSpringWheat, tov_PLWinterBarley, tov_PLWinterRape, tov_PLWinterRye, tov_PLWinterTriticale, tov_PLWinterWheat, tov_PLWinterWheatLate, tov_Potatoes, tov_PotatoesIndustry, tov_SeedGrass1, tov_SeedGrass2, tov_Setaside, tov_SpringBarley, tov_SpringBarleyCloverGrass, tov_SpringBarleyGrass, tov_SpringBarleyPeaCloverGrassStrigling, tov_SpringBarleyPTreatment, tov_SpringBarleySeed, tov_SpringBarleySilage, tov_SpringBarleySKManagement, tov_SpringBarleySpr, tov_SpringBarleyStrigling, tov_SpringBarleyStriglingCulm, tov_SpringBarleyStriglingSingle, tov_SpringRape, tov_SpringWheat, tov_SugarBeet, tov_Triticale, tov_Undefined, tov_Wasteland, tov_WaterBufferZone, tov_WinterBarley, tov_WinterRape, tov_WinterRye, tov_WinterWheat, tov_WinterWheatShort, tov_WinterWheatStrigling, tov_WinterWheatStriglingCulm, tov_WinterWheatStriglingSingle, tov_WWheatPControl, tov_WWheatPToxicControl, tov_WWheatPTreatment, tov_YoungForest, MapErrorMsg::Warn(), and WARN_FILE.

Referenced by Landscape::BackTranslateVegTypes().

◆ TranslateEleTypes()

TTypesOfLandscapeElement LE_TypeClass::TranslateEleTypes ( int  EleReference)
2995  {
2996  static char error_num[ 20 ];
2997 
2998  // This returns the vegetation type (or crop type) as applicable
2999  switch ( EleReference ) {
3000  case 5: return tole_Building;
3001  case 8: return tole_UrbanNoVeg;
3002  case 9: return tole_UrbanVeg;
3003  case 11: return tole_Garden;
3004  case 12: return tole_AmenityGrass;
3005  case 13: return tole_RoadsideVerge;
3006  case 14: return tole_Parkland;
3007  case 15: return tole_StoneWall;
3008  case 16: return tole_BuiltUpWithParkland;
3009  case 17: return tole_UrbanPark;
3010  case 20: return tole_Field;
3011  case 27: return tole_PermPastureTussocky;
3012  case 26: return tole_PermPastureLowYield;
3013  case 31: return tole_UnsprayedFieldMargin;
3014  case 33: return tole_PermanentSetaside;
3015  case 35: return tole_PermPasture;
3016  case 40: return tole_DeciduousForest;
3017  case 41: return tole_Copse;
3018  case 50: return tole_ConiferousForest;
3019  case 55: return tole_YoungForest;
3020  case 56: return tole_Orchard;
3021  case 69: return tole_BareRock;
3022  case 57: return tole_OrchardBand;
3023  case 58: return tole_MownGrass;
3024  case 60: return tole_MixedForest;
3025  case 70: return tole_Scrub;
3026  case 75: return tole_PitDisused;
3027  case 80: return tole_Saltwater;
3028  case 90: return tole_Freshwater;
3029  case 94: return tole_Heath;
3030  case 95: return tole_Marsh;
3031  case 96: return tole_River;
3032  case 97: return tole_RiversideTrees;
3033  case 98: return tole_RiversidePlants;
3034  case 100: return tole_Coast;
3035  case 101: return tole_SandDune;
3036  case 110: return tole_NaturalGrassDry;
3037  case 115: return tole_ActivePit;
3038  case 118: return tole_Railway;
3039  case 121: return tole_LargeRoad;
3040  case 122: return tole_SmallRoad;
3041  case 123: return tole_Track;
3042  case 130: return tole_Hedges;
3043  case 140: return tole_HedgeBank;
3044  case 141: return tole_BeetleBank;
3045  case 150: return tole_Chameleon;
3046  case 160: return tole_FieldBoundary;
3047  case 201: return tole_RoadsideSlope;
3048  case 202: return tole_MetalledPath;
3049  case 203: return tole_Carpark;
3050  case 204: return tole_Churchyard;
3051  case 205: return tole_NaturalGrassWet;
3052  case 206: return tole_Saltmarsh;
3053  case 207: return tole_Stream;
3054  case 208: return tole_HeritageSite;
3055  case 209: return tole_Wasteland;
3056  case 210: return tole_UnknownGrass;
3057  case 211: return tole_WindTurbine;
3058  case 212: return tole_Pylon;
3059  case 213: return tole_IndividualTree;
3060  case 214: return tole_PlantNursery;
3061  case 215: return tole_Vildtager;
3062  case 216: return tole_WoodyEnergyCrop;
3063  case 217: return tole_WoodlandMargin;
3064  case 218: return tole_PermPastureTussockyWet;
3065  case 219: return tole_Pond;
3066  case 220: return tole_FishFarm;
3067  case 221: return tole_RiverBed;
3068  case 222: return tole_DrainageDitch;
3069  case 223: return tole_Canal;
3070  case 224: return tole_RefuseSite;
3071  case 225: return tole_Fence;
3072  case 226: return tole_WaterBufferZone;
3073  case 2112: return tole_Missing;
3074 
3075  // case 999: return tole_Foobar;
3076  // !! type unknown - should not happen
3077  default:
3078  sprintf( error_num, "%d", EleReference );
3079  g_msg->Warn( WARN_FILE, "LE_TypeClass::TranslateEleTypes(): ""Unknown landscape element type:", error_num );
3080  exit( 1 );
3081  }
3082 }

References g_msg, tole_ActivePit, tole_AmenityGrass, tole_BareRock, tole_BeetleBank, tole_Building, tole_BuiltUpWithParkland, tole_Canal, tole_Carpark, tole_Chameleon, tole_Churchyard, tole_Coast, tole_ConiferousForest, tole_Copse, tole_DeciduousForest, tole_DrainageDitch, tole_Fence, tole_Field, tole_FieldBoundary, tole_FishFarm, tole_Freshwater, tole_Garden, tole_Heath, tole_HedgeBank, tole_Hedges, tole_HeritageSite, tole_IndividualTree, tole_LargeRoad, tole_Marsh, tole_MetalledPath, tole_Missing, tole_MixedForest, tole_MownGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_Orchard, tole_OrchardBand, tole_Parkland, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PermPastureTussockyWet, tole_PitDisused, tole_PlantNursery, tole_Pond, tole_Pylon, tole_Railway, tole_RefuseSite, tole_River, tole_RiverBed, tole_RiversidePlants, tole_RiversideTrees, tole_RoadsideSlope, tole_RoadsideVerge, tole_Saltmarsh, tole_Saltwater, tole_SandDune, tole_Scrub, tole_SmallRoad, tole_StoneWall, tole_Stream, tole_Track, tole_UnknownGrass, tole_UnsprayedFieldMargin, tole_UrbanNoVeg, tole_UrbanPark, tole_UrbanVeg, tole_Vildtager, tole_Wasteland, tole_WaterBufferZone, tole_WindTurbine, tole_WoodlandMargin, tole_WoodyEnergyCrop, tole_YoungForest, MapErrorMsg::Warn(), and WARN_FILE.

Referenced by PollenNectarDevelopmentData::GetPollenNectarCurvePtr(), Landscape::Landscape(), Landscape::ReadPolys2(), and Landscape::TranslateEleTypes().

◆ TranslateVegTypes()

TTypesOfVegetation LE_TypeClass::TranslateVegTypes ( int  VegReference)
3088  {
3089  char error_num[ 20 ];
3090 
3091  // This returns the vegetation type (or crop type) as applicable
3092  switch ( VegReference ) {
3093  case 1:
3094  return tov_SpringBarley;
3095  case 2:
3096  return tov_WinterBarley;
3097  case 3:
3098  return tov_SpringWheat;
3099  case 4:
3100  return tov_WinterWheat;
3101  case 5:
3102  return tov_WinterRye;
3103  case 6:
3104  return tov_Oats;
3105  case 7:
3106  return tov_Triticale;
3107  case 8:
3108  return tov_Maize;
3109  case 13:
3110  return tov_SpringBarleySeed;
3111  case 14: return tov_SpringBarleyStrigling;
3112  case 15: return tov_SpringBarleyStriglingSingle;
3113  case 16: return tov_SpringBarleyStriglingCulm;
3114  case 17: return tov_WinterWheatStrigling;
3115  case 18: return tov_WinterWheatStriglingSingle;
3116  case 19: return tov_WinterWheatStriglingCulm;
3117  case 21:
3118  return tov_SpringRape;
3119  case 22:
3120  return tov_WinterRape;
3121  case 30:
3122  return tov_FieldPeas;
3123  case 31:
3124  return tov_FieldPeasSilage; //ok?
3125  case 32:
3126  return tov_BroadBeans;
3127  case 50:
3128  return tov_Setaside;
3129  case 54:
3130  return tov_PermanentSetaside;
3131  case 55:
3132  return tov_YoungForest;
3133  case 60:
3134  return tov_FodderBeet;
3135  case 61:
3136  return tov_SugarBeet;
3137  case 65:
3138  return tov_CloverGrassGrazed1;
3139  case 92:
3140  return tov_PotatoesIndustry;
3141  case 93:
3142  return tov_Potatoes;
3143  case 94:
3144  return tov_SeedGrass1;
3145  case 102:
3146  return tov_OWinterBarley;
3147  case 611:
3148  return tov_OWinterBarleyExt;
3149  case 103:
3150  return tov_OSBarleySilage;
3151  case 105:
3152  return tov_OWinterRye;
3153  case 106:
3154  return tov_OFieldPeasSilage;
3155  case 107:
3156  return tov_SpringBarleyGrass;
3157  case 108:
3159  case 109:
3160  return tov_SpringBarleySpr;
3161  case 113:
3163  case 114:
3165  case 115:
3166  return tov_SpringBarleySilage;
3167  case 122:
3168  return tov_OWinterRape;
3169  case 140:
3170  return tov_PermanentGrassGrazed;
3171  case 141:
3173  case 142:
3175  case 165:
3176  return tov_CloverGrassGrazed2;
3177  case 194:
3178  return tov_SeedGrass2;
3179  case 201:
3180  return tov_OSpringBarley;
3181  case 204:
3183  case 205:
3184  return tov_OWinterWheat;
3185  case 206:
3186  return tov_OOats;
3187  case 207:
3188  return tov_OTriticale;
3189  case 230:
3190  return tov_OFieldPeas;
3191  case 26:
3192  return tov_OFodderBeet;
3193  case 265:
3194  return tov_OCloverGrassGrazed1;
3195  case 270:
3196  return tov_OCarrots;
3197  case 271:
3198  return tov_Carrots;
3199  case 272:
3200  return tov_Wasteland;
3201  case 273:
3202  return tov_OGrazingPigs;
3203  case 293:
3204  return tov_OPotatoes;
3205  case 294:
3206  return tov_OSeedGrass1;
3207  case 306:
3208  return tov_OSpringBarleyPigs;
3209  case 307:
3210  return tov_OSpringBarleyGrass;
3211  case 308:
3212  return tov_OSpringBarleyClover;
3213  case 340:
3215  case 365:
3216  return tov_OCloverGrassGrazed2;
3217  case 366:
3218  return tov_OCloverGrassSilage1;
3219  case 394:
3220  return tov_OSeedGrass2;
3221  case 400:
3222  return tov_NaturalGrass;
3223  case 401:
3224  return tov_None;
3225  case 601:
3226  return tov_WWheatPControl;
3227  case 602:
3228  return tov_WWheatPToxicControl;
3229  case 603:
3230  return tov_WWheatPTreatment;
3231  case 604:
3233  case 605:
3234  return tov_WinterWheatShort;
3235  case 606:
3236  return tov_MaizeSilage;
3237  case 607:
3238  return tov_FodderGrass;
3239  case 608:
3241  case 609:
3242  return tov_OSpringBarleyExt;
3243  case 610:
3244  return tov_OMaizeSilage;
3245  case 612:
3247  case 613:
3248  return tov_Heath;
3249  case 700:
3250  return tov_OrchardCrop;
3251  case 701:
3252  return tov_WaterBufferZone;
3253  case 801:
3254  return tov_PLWinterWheat;
3255  case 802:
3256  return tov_PLWinterRape;
3257  case 803:
3258  return tov_PLWinterBarley;
3259  case 804:
3260  return tov_PLWinterTriticale;
3261  case 805:
3262  return tov_PLWinterRye;
3263  case 806:
3264  return tov_PLSpringWheat;
3265  case 807:
3266  return tov_PLSpringBarley;
3267  case 808:
3268  return tov_PLMaize;
3269  case 809:
3270  return tov_PLMaizeSilage;
3271  case 810:
3272  return tov_PLPotatoes;
3273  case 811:
3274  return tov_PLBeet;
3275  case 812:
3276  return tov_PLFodderLucerne1;
3277  case 813:
3278  return tov_PLFodderLucerne2;
3279  case 814:
3280  return tov_PLCarrots;
3281  case 815:
3282  return tov_PLSpringBarleySpr;
3283  case 816:
3284  return tov_PLWinterWheatLate;
3285  case 817:
3286  return tov_PLBeetSpr;
3287  case 818:
3288  return tov_PLBeans;
3289 
3290  case 850:
3291  return tov_NLBeet;
3292  case 851:
3293  return tov_NLCarrots;
3294  case 852:
3295  return tov_NLMaize;
3296  case 853:
3297  return tov_NLPotatoes;
3298  case 854:
3299  return tov_NLSpringBarley;
3300  case 855:
3301  return tov_NLWinterWheat;
3302  case 856:
3303  return tov_NLCabbage;
3304  case 857:
3305  return tov_NLTulips;
3306  case 858:
3307  return tov_NLGrassGrazed1;
3308  case 859:
3309  return tov_NLGrassGrazed2;
3310  case 860:
3312  case 861:
3313  return tov_NLCatchPeaCrop;
3314  case 862:
3315  return tov_NLBeetSpring;
3316  case 863:
3317  return tov_NLCarrotsSpring;
3318  case 864:
3319  return tov_NLMaizeSpring;
3320  case 865:
3321  return tov_NLPotatoesSpring;
3322  case 866:
3323  return tov_NLSpringBarleySpring;
3324  case 867:
3325  return tov_NLCabbageSpring;
3326  case 868:
3327  return tov_NLGrassGrazed1Spring;
3328  case 869:
3329  return tov_NLGrassGrazedLast;
3330 
3331  case 888:
3332  return tov_DummyCropPestTesting;
3333 
3334  case 999:
3335  return tov_Undefined;
3336  default: // No matching code so we need an error message of some kind
3337  sprintf( error_num, "%d", VegReference );
3338  g_msg->Warn( WARN_FILE, "LE_TypeClass::TranslateVegTypes(): ""Unknown vegetation type:", error_num );
3339  exit( 1 );
3340  }
3341 }

References g_msg, tov_AgroChemIndustryCereal, tov_BroadBeans, tov_Carrots, tov_CloverGrassGrazed1, tov_CloverGrassGrazed2, tov_DummyCropPestTesting, tov_FieldPeas, tov_FieldPeasSilage, tov_FodderBeet, tov_FodderGrass, tov_Heath, tov_Maize, tov_MaizeSilage, tov_NaturalGrass, tov_NLBeet, tov_NLBeetSpring, tov_NLCabbage, tov_NLCabbageSpring, tov_NLCarrots, tov_NLCarrotsSpring, tov_NLCatchPeaCrop, tov_NLGrassGrazed1, tov_NLGrassGrazed1Spring, tov_NLGrassGrazed2, tov_NLGrassGrazedLast, tov_NLMaize, tov_NLMaizeSpring, tov_NLPermanentGrassGrazed, tov_NLPotatoes, tov_NLPotatoesSpring, tov_NLSpringBarley, tov_NLSpringBarleySpring, tov_NLTulips, tov_NLWinterWheat, tov_None, tov_Oats, tov_OBarleyPeaCloverGrass, tov_OCarrots, tov_OCloverGrassGrazed1, tov_OCloverGrassGrazed2, tov_OCloverGrassSilage1, tov_OFieldPeas, tov_OFieldPeasSilage, tov_OFodderBeet, tov_OGrazingPigs, tov_OMaizeSilage, tov_OOats, tov_OPermanentGrassGrazed, tov_OPotatoes, tov_OrchardCrop, tov_OSBarleySilage, tov_OSeedGrass1, tov_OSeedGrass2, tov_OSpringBarley, tov_OSpringBarleyClover, tov_OSpringBarleyExt, tov_OSpringBarleyGrass, tov_OSpringBarleyPigs, tov_OTriticale, tov_OWinterBarley, tov_OWinterBarleyExt, tov_OWinterRape, tov_OWinterRye, tov_OWinterWheat, tov_OWinterWheatUndersown, tov_PermanentGrassGrazed, tov_PermanentGrassLowYield, tov_PermanentGrassTussocky, tov_PermanentSetaside, tov_PLBeans, tov_PLBeet, tov_PLBeetSpr, tov_PLCarrots, tov_PLFodderLucerne1, tov_PLFodderLucerne2, tov_PLMaize, tov_PLMaizeSilage, tov_PLPotatoes, tov_PLSpringBarley, tov_PLSpringBarleySpr, tov_PLSpringWheat, tov_PLWinterBarley, tov_PLWinterRape, tov_PLWinterRye, tov_PLWinterTriticale, tov_PLWinterWheat, tov_PLWinterWheatLate, tov_Potatoes, tov_PotatoesIndustry, tov_SeedGrass1, tov_SeedGrass2, tov_Setaside, tov_SpringBarley, tov_SpringBarleyCloverGrass, tov_SpringBarleyGrass, tov_SpringBarleyPeaCloverGrassStrigling, tov_SpringBarleyPTreatment, tov_SpringBarleySeed, tov_SpringBarleySilage, tov_SpringBarleySKManagement, tov_SpringBarleySpr, tov_SpringBarleyStrigling, tov_SpringBarleyStriglingCulm, tov_SpringBarleyStriglingSingle, tov_SpringRape, tov_SpringWheat, tov_SugarBeet, tov_Triticale, tov_Undefined, tov_Wasteland, tov_WaterBufferZone, tov_WinterBarley, tov_WinterRape, tov_WinterRye, tov_WinterWheat, tov_WinterWheatShort, tov_WinterWheatStrigling, tov_WinterWheatStriglingCulm, tov_WinterWheatStriglingSingle, tov_WWheatPControl, tov_WWheatPToxicControl, tov_WWheatPTreatment, tov_YoungForest, MapErrorMsg::Warn(), and WARN_FILE.

Referenced by Farm::HandleEvents(), OptimisingFarm::HandleEvents(), Farm::InitiateManagement(), and Landscape::TranslateVegTypes().

◆ VegTypeToCurveNum()

int LE_TypeClass::VegTypeToCurveNum ( TTypesOfVegetation  VegReference)

The documentation for this class was generated from the following files: